<h2>Listing hosts</h2>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>Ip</th>
    <th colspan=2>Commands</th>
  </tr>

<% @hosts.each do |host| %>
  <tr>
    <td><%= link_to host.name, edit_host_path(host) %></td>
    <td><%= host.description %></td>
    <td><%= host.ip %></td>
    <td><%= link_to 'Edit', edit_host_path(host) %></td>
    <td><%= link_to 'Destroy', host, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Host', new_host_path %>
